package com.hksj.tdengine.taos.service.impl;

import com.hksj.common.config.annotation.DS_TAOS;
import com.hksj.tdengine.taos.mapper.TaosMapper;
import com.hksj.tdengine.taos.service.TaosService;
import org.springframework.stereotype.Service;

/**
 * @author zengke
 * @version 1.0
 * @see TaosServiceImpl
 * @since 2024/8/9 11:29
 */

@Service
public class TaosServiceImpl implements TaosService {

    private final TaosMapper taosMapper;

    public TaosServiceImpl(TaosMapper taosMapper){
        this.taosMapper = taosMapper;
    }

    @Override
    public Boolean checkDatabase(String databaseName){
        return taosMapper.checkDatabase(databaseName) > 0;
    }

    @Override
    public Boolean checkStable(String databaseName, String stableName) {
        return taosMapper.checkStable(databaseName,stableName) > 0;
    }

    @Override
    public Boolean checkTable(String databaseName, String tableName) {
        return taosMapper.checkTable(databaseName,tableName) > 0;
    }
}
